        # pr = pr[int((self.input_shape[0] - nh) // 2) : int((self.input_shape[0] - nh) // 2 + nh), \
        #         int((self.input_shape[1] - nw) // 2) : int((self.input_shape[1] - nw) // 2 + nw)]


work_path = "/home/aistudio/net_params/"
if os.path.exists(work_path):
    shutil.rmtree(work_path)
os.mkdir(work_path)

plt.figure(figsize=(10, 10))
IMAGE_SIZE = (512, 512)
i = 0
mask_idx = 0

# with open('./val_list.txt', 'r') as f:
# with open('paddle_test/val_list.txt', 'r') as f:
with open('chest/val_list.txt', 'r') as f:
    for line in f.readlines():
        image_path, label_path = line.strip().split(' ')
        resize_t = T.Compose([
            T.Resize(IMAGE_SIZE)
        ])
        image = resize_t(Image.open(image_path))
        label = resize_t(Image.open(label_path))

        image = np.array(image).astype('uint8')
        label = np.array(label).astype('uint8')

        if i > 8:
            break
        plt.subplot(3, 3, i + 1)
        plt.imshow(image)
        plt.title('Input Image')
        plt.axis("off")

        plt.subplot(3, 3, i + 2)
        plt.imshow(label, cmap='gray')
        plt.title('Label')
        plt.axis("off")

        # 模型只有一个输出，所以我们通过predict_results[0]来取出1000个预测的结果
        # 映射原始图片的index来取出预测结果，提取mask进行展示
        mask = paddle.argmax(network(paddle.to_tensor([((image - 127.5) / 127.5).transpose(2, 0, 1)]))[0], axis=0).numpy()

        plt.subplot(3,3, i + 3)
        plt.imshow(mask.astype('uint8'), cmap='gray')
        plt.title('Predict')
        plt.axis("off")
        i += 3
        mask_idx += 1

plt.show()

# String.format("%03d", i)主要实现如果一个数字为超过3位，
# 则会在其前面补零以到达规定的位数，其中o是被填充到缺省位的数字，
# 3代表规定数字的总位数  d代表是整型。